Bouncing Item

Blitz3D Forums/Blitz3D Programming/Bouncing Item

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.

[Very rough method, which is an offence to Newton physic]

You could, for example, when you want your pivot bouncing:
- create a new pivot just behind your main one
- point to it with pointentity
- move your main pivot, which now will move in the opposite direction, thus bouncing
- destroy the just created pivot with FreeEntity

OR (easyer:)
- if collision then
-- TurnEntity 0,90,0
-- MoveEntity...

Bare in mind that if you, in your main loop, point your entity again toward the locaplayer, then your pivot will change again direction, so you have to make the pointentity direction once - before the mainloop, and then change the direction only when it collides.

Hope this helps,
Sergio.