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.

Dark Physics & Dark A.I. & Dark Dynamix / Walking into physics objects with a non-phy character?

Author
Message
culmor30
17
Years of Service
User Offline
Joined: 16th Jun 2007
Location: In my head.
Posted: 8th Mar 2008 04:15
Is it possible to have my character cube push boxes in front of him without using the character controller? I hate the character controller. I'll use sparky's if necessary. I just have a whole bunch of cubes stacked with a for/next and I want to be able to kick them while walking. Here's my code:



Thanks much in advance.
Kendor
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location: Malta
Posted: 8th Mar 2008 11:16 Edited at: 8th Mar 2008 11:18
In your case you need to use a kinematic dummy object, that will act like a character controller. This works by positioning the kinematic object where your player is, at each loop.

First, place this code just after you create your PlayerObject:



And then place this before phy update 1 and phy update 0 in the main loop:




P.s. It is better if you either include the media or else make a stripped down version without media, when asking for help, as people will be more reluctant to help.

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why.
Programmers combine theory and practice: Nothing works and they don't know why.
culmor30
17
Years of Service
User Offline
Joined: 16th Jun 2007
Location: In my head.
Posted: 9th Mar 2008 11:28
Oh... thanks dude, you didn't have to code it for me. Just wanted a general idea. But thanks.

Now on to my next question, how would I adapt my code for allowing walking on top of boxes? That's getting a bit advanced :\

If you need my media, I can post it.

Login to post a reply

Server time is: 2024-11-24 22:54:09
Your offset time is: 2024-11-24 22:54:09