Search found 12 matches

by mos
Fri Oct 07, 2016 4:54 am
Forum: Questions and Help
Topic: Bounding Boxes resizing and sliding
Replies: 1
Views: 3092

Bounding Boxes resizing and sliding

Is it normal for the bounding boxes to resize as you move/jump? For example, when I jump the bounding box increases in size downwards then goes back to normal when it collides with something. It also becomes bigger when I rotate. For example, when I do this: Quaternion.CreateFromAxisAngle(Vector3.Up...
by mos
Wed Sep 21, 2016 2:15 am
Forum: Questions and Help
Topic: Convert XNA Framework Quaternion to BEPUutilities.Quaternion
Replies: 8
Views: 6174

Re: Convert XNA Framework Quaternion to BEPUutilities.Quater

Ahh ok, that makes sense. I guess I have a bit of reading to do then on what kind of math actually goes on behind the scenes. Thanks again!
by mos
Wed Sep 21, 2016 1:39 am
Forum: Questions and Help
Topic: Convert XNA Framework Quaternion to BEPUutilities.Quaternion
Replies: 8
Views: 6174

Re: Convert XNA Framework Quaternion to BEPUutilities.Quater

Thank you very much! In case I run into another problem like this again, how would I find something like that out? I looked in the method CreateFromYawPitchRoll here: https://bepuphysics.codeplex.com/SourceControl/latest#BEPUutilities/Quaternion.cs but didn't see anything about dividing by zero. Did...
by mos
Wed Sep 21, 2016 12:49 am
Forum: Questions and Help
Topic: Convert XNA Framework Quaternion to BEPUutilities.Quaternion
Replies: 8
Views: 6174

Re: Convert XNA Framework Quaternion to BEPUutilities.Quater

I pass the rotation in the constructor like this: Quaternion rotation = default(Quaternion) as an optional parameter. I set it like this: this.rotation = rotation. I go through the break points, and if I don't set a rotation the values are zero according to the debugger. So there shouldn't be any ne...
by mos
Wed Sep 21, 2016 12:34 am
Forum: Questions and Help
Topic: Convert XNA Framework Quaternion to BEPUutilities.Quaternion
Replies: 8
Views: 6174

Re: Convert XNA Framework Quaternion to BEPUutilities.Quater

I put break point on each line of the conversion and when I call the conversion method. As soon as it is returned from the Conversion method and goes to the next line after body.Box.Orientation = ConvertTo.BEPUQuaternion(rotation), the values become NaN. You can see it here: http://i.imgur.com/5n3u3...
by mos
Tue Sep 20, 2016 11:56 pm
Forum: Questions and Help
Topic: Convert XNA Framework Quaternion to BEPUutilities.Quaternion
Replies: 8
Views: 6174

Convert XNA Framework Quaternion to BEPUutilities.Quaternion

I need help converting Quaternions. I have this code: public static BEPUutilities.Quaternion BEPUQuaternion(Quaternion xnaQuarternion) { BEPUutilities.Quaternion bepuQuaternion = new BEPUutilities.Quaternion(); bepuQuaternion.W = xnaQuarternion.W; bepuQuaternion.X = xnaQuarternion.X; bepuQuaternion....
by mos
Tue Sep 20, 2016 4:20 am
Forum: Questions and Help
Topic: How to do collision resolution correctly
Replies: 9
Views: 7020

Re: How to do collision resolution correctly

Thank you very much! Didn't know there were friction settings. Setting kinetic friction to 0.3 made it work really good.
by mos
Mon Sep 19, 2016 6:40 am
Forum: Questions and Help
Topic: How to do collision resolution correctly
Replies: 9
Views: 7020

Re: How to do collision resolution correctly

I have another problem if you don't mind helping again. When I press up, I add to the linear velocity in the Z direction. If there is a wall there, it will collide perfectly fine. However, if I hold Up while colliding with the wall, my model will stay there and not fall. It starts falling if I try t...
by mos
Sun Sep 18, 2016 8:15 pm
Forum: Questions and Help
Topic: How to do collision resolution correctly
Replies: 9
Views: 7020

Re: How to do collision resolution correctly

Oooh, makes so much sense now. Thank you for all your help! :D
by mos
Sun Sep 18, 2016 8:06 pm
Forum: Questions and Help
Topic: How to do collision resolution correctly
Replies: 9
Views: 7020

Re: How to do collision resolution correctly

Thank you so much! It works so much better now. Can I ask you one more question? What is the proper way to set the scale? I created this conversion method: public static Matrix XNAMatrix(BEPUutilities.Matrix bepuMatrix) { Matrix xnaMatrix = new Matrix(); xnaMatrix.M11 = bepuMatrix.M11; xnaMatrix.M12...
by mos
Sun Sep 18, 2016 2:35 am
Forum: Questions and Help
Topic: How to do collision resolution correctly
Replies: 9
Views: 7020

Re: How to do collision resolution correctly

Thanks for the reply. Are you saying I should be doing effect.World = sphereBox.WorldTransform * Translation? If so, effect.World only takes the XNA Framework Matrix and not BEPUutilities. How would I convert sphereBox.WorldTransform to a XNA Matrix? Luckily, the origin was at the center of the cube...
by mos
Sat Sep 17, 2016 3:43 am
Forum: Questions and Help
Topic: How to do collision resolution correctly
Replies: 9
Views: 7020

How to do collision resolution correctly

UPDATE: Game1.cpp: https://gist.github.com/anonymous/b6574aff509dbc11b267f87b5dd63205 ConvertTo.cpp: https://gist.github.com/anonymous/39664aeb444ee0f2eef314b15467964c The three models are the default cubes from Blender with different colored materials on them. -------------------------------------...