need help plz
I''m a Student from Germany an I need bit help plz.
My question: Tutorial #30 on u''re site (The collision detection) is
very interesting an I want to explore a bit around. I want to add
a function that allows me to stop the balls, an then to follow the last 5 or 7 collisions back,
by pressing a key.
A reverse function in clear words. Please, can u help me to realize that function?
It would mean a lot to me. I dont have any idea how I can realize it.
Thank u for u''re site an tutorials.
I hope u can help me. Thanks.
(sorry ''bout my bad english)
Why not store the position of the ball(s) in an array eavery time there is a collision. If the user presses some key, simply show the ball(s) in their respective position(s). For example, use std::vector - easy and efficient.
Crispy
Crispy
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
If it uses a "proper" physics engine that relys on equations then you could eaisly go backwards. Depending on how good that engine was, you may need to store the state of the objects upon every collision.
However, if it uses deltas (which is considerably eaiser and will "do the job" in most cases), the furthure backwards you go, the more inaccurate the simulation will become.
I suspect that it uses deltas, but I have not read tutorial 30 in much detail at all, so I couldn''t tell you.
ANDREW RUSSELL STUDIOS
Cool Links :: [ GD | TG | MS | NeHe | PA | SA | M&S | TA | LiT | H*R ]
Got Clue? :: [ Start Here! | Google | MSDN | GameDev.net Reference | OGL v D3D | File Formats | Asking Questions | Go FAQ yourself ]
However, if it uses deltas (which is considerably eaiser and will "do the job" in most cases), the furthure backwards you go, the more inaccurate the simulation will become.
I suspect that it uses deltas, but I have not read tutorial 30 in much detail at all, so I couldn''t tell you.
Do not meddle in the affairs of moderators, for they are subtle and quick to anger.
ANDREW RUSSELL STUDIOS
Cool Links :: [ GD | TG | MS | NeHe | PA | SA | M&S | TA | LiT | H*R ]
Got Clue? :: [ Start Here! | Google | MSDN | GameDev.net Reference | OGL v D3D | File Formats | Asking Questions | Go FAQ yourself ]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement