Feature request

Blitz3D Forums/Blitz3D Programming/Feature request

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I sort of do this with all my entities anyway. Every entity that moves in my games has a pivot called physics_pivot.

I apply all the forces that are acting on the entity on the physics pivot...

The pivot starts at 0,0,0

There is a forward force on the entity
rotateentity physicspivot,entitypitch(player),entityyaw(player),entitypitch(player)
moveentity physics_pivot,0,0,2
gravity
translateentity physics_pivot,0,-.98,0
wind from the east...
translateentity physics_pibot,-.5,0,0
etc
etc

Then the location of the physics pivot is the resultant force on the entity... so you then just...
translateentity player,entityx(physics_pivot),entityy(physics_pivot),entityz(physics_pivot)
If you want to know the total speed of the player...

I have a pivot called middle that always stays at 0,0,0

So to get the speed:
speed=entitydistance(physics_pivot,middle)
Oh, and with the middle pivot you can dampen all the forces...
pointentity physics_pivot,middle
moveentity physics_pivot,0,0,speed*.9
will reduce all the forces to 90%

Anyway, there's Rob 'no math' coding 101 for you!