Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Pushing an object

Author
Message
Krisper
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location:
Posted: 13th Mar 2008 04:37
Hi, I am pretty new to DBPro and I have been playing with sparky's collision dll the last couple of days. The demos that came with it were invaluable in helping me use it in my project. So far I have the sliding working when I collide with an object. Next I created another group of objects that I want to be able to move by pushing them.

Can anyone give me some hints on how to do that? Can I use sparky's dll or do I use the inbuilt collision features? I want the direction I push the object to be the same direction I am moving, not necessarily the direction I am facing. Any help will be appreciated.
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 13th Mar 2008 17:30
Take a look at the RoomDemo that came with DBPro. There's a section of wall in the room that can be pushed to reveal a hidden chamber.

jasonhtml
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: OC, California, USA
Posted: 13th Mar 2008 18:42
well, just so you get the gist, you could get the angle at which the player is moving(i assume this is easy) and then rotate the object the you are pushing to that same angle(but watch out here, if you want objects to slide on a surface, make sure you add some adjustments so that you aren't pushing the object up while you jump or something similar. this will cause the object to behave strangely) then, move the pushed object at the same speed as the player(or faster if the movement is supposed to be a shove and the object moves freely for a bit)

that should get you started(assuming coding it isn't too hard) and if you want to get more complex, you could deal with components of force so that if you are pushing at an angle, the objects will rotate.

Krisper
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location:
Posted: 13th Mar 2008 23:20
Thanks for the tips, I have looked at the RoomDemo a couple of times, but it is a bit complex for me to figure out at the moment. I did find a simpler sliding collision example that was easy to modify to push some objects and slide off others. Sparky's dll works fantastic, but I am still struggling to understand it so I think I'll use the simpler code until I get better at this.
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 25th Mar 2008 08:17 Edited at: 25th Mar 2008 08:42
i need help for pushing objects and being able to turn corners while pushing them..i have found benji's code and i think i can modify it to work...sorry for the post, i should have looked better...pirate

thanks, pirate
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 26th Mar 2008 15:19
pirate, cant you somehow use limbs? and glue object to limb? if its a really complex manouver??

Paul

Login to post a reply

Server time is: 2024-11-15 16:14:13
Your offset time is: 2024-11-15 16:14:13