Search found 11 matches

by JanWH
Tue Jun 21, 2011 7:53 pm
Forum: Questions and Help
Topic: Getting CompoundBodys ShapeEntry hit by Raycast
Replies: 7
Views: 4776

Re: Getting CompoundBodys ShapeEntry hit by Raycast

I construct my CompoundBody from CompoundShapeEntry's and they are constructed with a BoxShape, so can Tag only my CompoundBody. Ok i'm a bit code blind, i just had to do CompoundBody.Children.indexOf(hitChild) to get the index, ok i can work with that, but it would be nice to Tag Shapes in the futu...
by JanWH
Tue Jun 21, 2011 7:38 pm
Forum: Questions and Help
Topic: Getting CompoundBodys ShapeEntry hit by Raycast
Replies: 7
Views: 4776

Re: Getting CompoundBodys ShapeEntry hit by Raycast

I couldnt resist trying, so i wrote this extension class public static class CompoundBodyExtension{ public static bool InternalRayCast( this CompoundCollidable cb, Ray ray, float maximumLength, out RayHit rayHit, out CompoundChild hitChild ) { rayHit = new RayHit(); hitChild = null; var hitElements ...
by JanWH
Tue Jun 21, 2011 7:00 pm
Forum: Questions and Help
Topic: Getting CompoundBodys ShapeEntry hit by Raycast
Replies: 7
Views: 4776

Re: Getting CompoundBodys ShapeEntry hit by Raycast

After some experimentation with youre code, i now get why its so complex to get that info.

I will make due with the CompundBody till the next DevVersion is out, thx.
by JanWH
Tue Jun 21, 2011 5:55 pm
Forum: Questions and Help
Topic: Getting CompoundBodys ShapeEntry hit by Raycast
Replies: 7
Views: 4776

Getting CompoundBodys ShapeEntry hit by Raycast

As the topic states i have a compoundbody that is hit by a RayCast and it returns the CompundShape but not the ShapeEntry that was hit.
I use the current development version because in another thread there was hint that the CompoundBodys are better implemented there.
by JanWH
Sat Jun 18, 2011 12:37 am
Forum: Questions and Help
Topic: Toolbox GetAxisAngleFromQuaternion
Replies: 8
Views: 5687

Re: Toolbox GetAxisAngleFromQuaternion

*googles:lollygags* *wonders*

Ah interesting, now i know whats going wrong, my distance was just 1/60 of the actual distance.
I thought AngularVelocity.x = PI should be a 180 in 1 tick but 1 tick = 1/60 .... could have guesd it ;)
thx
by JanWH
Fri Jun 17, 2011 11:41 pm
Forum: Questions and Help
Topic: Toolbox GetAxisAngleFromQuaternion
Replies: 8
Views: 5687

Re: Toolbox GetAxisAngleFromQuaternion

Yes youre right and i had some fun with the Servo/Spring constants but it didnt work the way i wanted, i need the user to tune those values and i dont think they can figure that out. Just one more Quesition, i just copied youre Rotator code and it didnt work outside of void IDuringForcesUpdateable.U...
by JanWH
Fri Jun 17, 2011 10:47 pm
Forum: Questions and Help
Topic: Toolbox GetAxisAngleFromQuaternion
Replies: 8
Views: 5687

Re: Toolbox GetAxisAngleFromQuaternion

Jep i copied that already ;) What i try to make is a less "bouncie" rotator. I have a ship i want to turn and it needs to stop at a given position. But it can only accelerate or decelerate its angular velocity to achieve that, so it needs to "break" befor it hits the target direc...
by JanWH
Fri Jun 17, 2011 10:27 pm
Forum: Questions and Help
Topic: Toolbox GetAxisAngleFromQuaternion
Replies: 8
Views: 5687

Re: Toolbox GetAxisAngleFromQuaternion

I knew that i get 2 results on the opposite side, but i thought i was in a reasonable distance to that point. I see difference at angles > Pi/2 they are small but noticable, could be something else. The point i used in my example will not flip 180 but the Z axis rotation will alternate between 0 and...
by JanWH
Fri Jun 17, 2011 9:33 pm
Forum: Questions and Help
Topic: Toolbox GetAxisAngleFromQuaternion
Replies: 8
Views: 5687

Toolbox GetAxisAngleFromQuaternion

Hello, i tried to reuse youre code from the EntityRotator and there is something i dont understand about the function public static Vector3 GetAngularVelocity(Quaternion start, Quaternion end, float dt); it should return the the angular velocity between start and end so: var direction = Vector3.Norm...
by JanWH
Sat Nov 06, 2010 9:57 pm
Forum: Questions and Help
Topic: Simultaneous Thrust
Replies: 2
Views: 2776

Re: Simultaneous Thrust

Thanks, i scaled everything down by 10 that did not change much .... but removing the invisible other cube from space that was there from a previous test did the trick.
So its enterly my fault, apologies.
by JanWH
Sat Nov 06, 2010 9:05 pm
Forum: Questions and Help
Topic: Simultaneous Thrust
Replies: 2
Views: 2776

Simultaneous Thrust

Hello im trying to figure out the engine and bump into an interessting problem. Applying two impulses at the same frame produces drift. My Setup: phyBody = new Box(Vector3.Zero, 80, 100, 600,10); phyBody.AngularDamping = 0f; phyBody.LinearDamping = 0f; space.Add(phyBody); Each Frame i do: worldPosit...