Search found 52 matches

by JusTiCe8
Sun Aug 16, 2015 7:43 am
Forum: Questions and Help
Topic: Straight line path
Replies: 3
Views: 4263

Re: Straight line path

Could you keep it somewhere (external lib maybe), IMHO, paths could be very useful in some/many cases (especially platform games). It may be seen as a needless complication but I checked and creating a simple back & forth straight movement from scratch (even without talking about current velocit...
by JusTiCe8
Sat Aug 15, 2015 5:48 pm
Forum: Questions and Help
Topic: Straight line path
Replies: 3
Views: 4263

Straight line path

Hi Norbo, as I didn't found any help on making a simple straight line path for an entity, I try my own but I don't understand everything (it looks like to work but from my experience, it's never good to leave some "dark area" behind ;) ). What do you think about this code ? Is everything c...
by JusTiCe8
Sat Aug 08, 2015 8:27 am
Forum: Questions and Help
Topic: HELP: get position after rotate an entity
Replies: 4
Views: 4799

Re: HELP: get position after rotate an entity

Something like barrel.Position + barrel.OrientationMatrix.Up * (barrelHeight * 0.5) would work. That is equivalent to barrel.Position + Matrix3x3.Transform(Vector3.Up, barrel.OrientationMatrix) * (barrelHeight * 0.5). Rotation matrices have the nice property that you can directly pull the three mai...
by JusTiCe8
Fri Aug 07, 2015 8:22 pm
Forum: Questions and Help
Topic: HELP: get position after rotate an entity
Replies: 4
Views: 4799

HELP: get position after rotate an entity

Hi everyone, I have this: http://img15.hostingpics.net/pics/795499getposafterrot.jpg (The evil Euler angles strike back :P ) A cylinder, use as a cannon barrel, on the top of it (initial position), there is a sphere, just put at cylinder.Position.Y + Sphere.radius (= A) and a weldjoint between them....
by JusTiCe8
Sat Jul 25, 2015 7:55 am
Forum: Questions and Help
Topic: Huge positions and strange behaviour
Replies: 13
Views: 35648

Re: Huge positions and strange behaviour

Hi Norbo, 1) Keep the simulation somewhat near the origin. This could involve recentering the simulation over time, or having multiple simulations that have their own area of effect (with complicated transition behavior), or similar strategies. In one of my projects that has a large open world, I ke...
by JusTiCe8
Wed Jul 08, 2015 7:39 am
Forum: Questions and Help
Topic: Entity.LinearVelocity != 0 but entity not moving
Replies: 7
Views: 6442

Re: Entity.LinearVelocity != 0 but entity not moving

Oop, I just took a closer look. In that picture, the output speed and position seem suspiciously similar, almost as if they're the same values formatted differently :P :mrgreen: could you believe it ? the format string was: Pos X={0:F1} Y={1:F1} Z={2:F1}\nspeed X={[b][u]0[/u][/b]:F2} Y={[b][u]1[/u]...
by JusTiCe8
Tue Jul 07, 2015 5:18 pm
Forum: Questions and Help
Topic: Entity.LinearVelocity != 0 but entity not moving
Replies: 7
Views: 6442

Re: Entity.LinearVelocity != 0 but entity not moving

Is the ball controlled in any way? Do you ever set the ball's linear velocity yourself? If so, is it being set after the Space.Update? If so, the velocity read in draw will always pick up that written value, not the solver-computed value that got overwritten. To avoid this, either read the velocity...
by JusTiCe8
Tue Jul 07, 2015 3:51 pm
Forum: Questions and Help
Topic: Entity.LinearVelocity != 0 but entity not moving
Replies: 7
Views: 6442

Re: Entity.LinearVelocity != 0 but entity not moving

As you may have forgot the linear velocity issue, here is a pic of it ("speed" = all 3 components of the lin.vel.):

Image

Ball obviously doesn't move at all (data gathered on the draw call of the XNA game)
by JusTiCe8
Mon Jul 06, 2015 5:53 pm
Forum: Questions and Help
Topic: Falling from high "altitude" = terminal velocity ?
Replies: 3
Views: 4086

Re: Falling from high "altitude" = terminal velocity ?

Default LinearDamping is nonzero, which will have the effect of kinda-sorta drag. To get rid of it, set LinearDamping and AngularDamping to 0. Damping and gravity do not vary with height or anything else. Damping is just the portion of momentum removed per second. ok thanks. Any chance to get a gra...
by JusTiCe8
Mon Jul 06, 2015 11:50 am
Forum: Questions and Help
Topic: Falling from high "altitude" = terminal velocity ?
Replies: 3
Views: 4086

Falling from high "altitude" = terminal velocity ?

Hi, the case: I've made a basic rocket by using thruster from the demo with enough impulse to get kind of a thrust to weight ratio > 1. The "rocket" is just a tall box, mass is 5000, thruster have (0,55000,0) as force/direction. Rocket start a bit above the ground, thruster works well (spa...
by JusTiCe8
Fri Jul 03, 2015 6:26 pm
Forum: Questions and Help
Topic: Entity.LinearVelocity != 0 but entity not moving
Replies: 7
Views: 6442

Re: Entity.LinearVelocity != 0 but entity not moving

That's not expected behavior. Is the measurement being made after the LinearVelocity is being manually set each frame? Note that an entity that appears to be stationary may still have very small nonzero velocity (e.g. 0.00001), so avoid floating point comparisons with zero. Also, note that a deacti...
by JusTiCe8
Fri Jul 03, 2015 4:29 pm
Forum: Questions and Help
Topic: Entity.LinearVelocity != 0 but entity not moving
Replies: 7
Views: 6442

Entity.LinearVelocity != 0 but entity not moving

Hi Norbo, I have two questions, one as the title said, I have a dynamic entity (a sphere) and, in a maze, when the sphere is blocked by a wall, the LinearVelocity in the related direction stay as it was before (ex linVel.Z = -6.6 when the sphere stop moving). Is this the expected behavior ? If so, h...
by JusTiCe8
Sun Jun 28, 2015 2:49 pm
Forum: Questions and Help
Topic: EntityShape and Entity (compound bodies creation)
Replies: 3
Views: 5100

Re: EntityShape and Entity (compound bodies creation)

A MobileMesh is not a MobileMeshShape. A MobileMesh is an Entity with collision defined by a MobileMeshShape. (The existence of the prefab entity types like MobileMesh is one of those examples of 'fake' simplicity that's going away in v2.) So, all you need to do is to change "var staticMaze = ...
by JusTiCe8
Sat Jun 27, 2015 4:53 pm
Forum: Questions and Help
Topic: EntityShape and Entity (compound bodies creation)
Replies: 3
Views: 5100

EntityShape and Entity (compound bodies creation)

Hi, maybe you remember my rotating planes issue :), going back to it, in order to make an actual working maze, I haven't figured out how to do it. There are only simple examples of CompoundShape in demos using EntityShape objects, some using convexHull shape, but nothing else in EntityConstructionDe...