Pushing Items (THIS is so simple!)

Blitz3D Forums/Blitz3D Programming/Pushing Items (THIS is so simple!)

Neochrome(Posted 2004) [#1]
Well this is it!, its horrable, it works sideways very well, but i cant push it on all directions very well... can i ask for some help??




Neochrome(Posted 2004) [#2]
This code works!! some may need to improve on it, But the idea is there!




Rob(Posted 2004) [#3]
Why not simply add the velocity of the player to the collided object? you don't need normals...

Then when you collide, simply give the block your velocity exactly. It should push in the same direction.


Paul "Taiphoz"(Posted 2004) [#4]
Id give it half the players velocity to give it that hard to push look..

There could be some instances though when the player could be touching the item and goto push it but have it go the wrong way, just a matter of making sure that the collision is good enough.


poopla(Posted 2004) [#5]
Not using collisions normals is completely physically incorrect, and will look horrible.


RiverRatt(Posted 2004) [#6]
http://www.blitzbasic.com/codearcs/codearcs.php?code=944
http://www.blitzbasic.com/codearcs/codearcs.php?code=943


Neochrome(Posted 2004) [#7]
:o( i thought i did this ok..
i guess this isn't good code then ..

it works on my world anyway. looks ok

(defeated again)


Tiggertooth(Posted 2004) [#8]
Don't feel defeated. You got a solution that works for you.

Stick with it and as you go along, you'll find bugs and continually improve it. You might also consider playing with Tokamak physics for this (there are a lot of threads on it here, with links to other forums with yet more discussion).


Ken


Neochrome(Posted 2004) [#9]
oh man, i just been playing with some directx stuff in c++

the exe's would be at least 2meg!! fun tho. Im a weak C++ programmer tho, so most of the stuff i didn't understand at all :(

im sure Mark would be able to include the dx9 in B3d :)