A few questions for the more experienced...

Started by
3 comments, last by d000hg 18 years, 10 months ago
1st ) How do I move objects, or what is a good way to move objects in a 3D in relations with time? I have read a tutorial that uses the frame rate, but the results are choppy. I'm really bad at math here, so please help. 2nd ) BSP for collision? I have a source that explains the process. I really would not like to split the polygons. Should I? Also, the purpose for this is to use point to collision detection from projectiles in the mesh. I wanted to get as accurate as possible. So I figured BSP may be accurate and pretty fast too.
Take back the internet with the most awsome browser around, FireFox
Advertisement
Check out

1) this

and

2) this

HTH
I've seen the BSP FAQ before. I have book that covers a BSP and it's various implementations. But I'm going to use a design similar how I'm storing my objects in 3D. They are all in one array that had double linked-list pointers for faster access. All the polygons will be stored in a similar way. The hard part is the each polygon needs to have a updated if the object rotates in any way because the position of each polygon won'y be that same. I think this is wh BSP trees are used for collision detection on static objects instead of other objects that move around and rotate. I also figured out the timing part by my self.
Take back the internet with the most awsome browser around, FireFox
I have no experience with BSP, but as for your first question.

Assuming you have your engine pushing a consistent framerate, average it and set up a vector for your object with a speed value. Then you can just update position every tick (whatever you use as a game tick) relative to the number of frames/ticks your averaging a second.

By using the average instead of the current value you should be able to create a consistent movement unless rendering the object itself greatly impacts your framerate.

~Pax
In general I'd try to avoid BSP unless there was a clear-cut reason why it was the best choice. I find it a big pain, especially if you have to generate the BSP trees yourself... but I don't know your experience with this kind of stuff so this might not help you!

As for moving objects, I have a timestep of 0.01s for instance. If My game is actually running at 50fps, that means I do two fixed-timestep updates; if running at 33.3fps I do 3... Is this the kind of idea you're looking for? Variable timesteps are generally not used except in very simple situations.

This topic is closed to new replies.

Advertisement