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.

3 Dimensional Chat / Diagonal movement 3D using Move3DPhysicsCharacterController issue??

Author
Message
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 9th Feb 2018 19:08
I'm aware the virtual joystick gives values of -1 to 0 and 0 to 1, however when trying to combine two movements using the AppGameKit Move3DPhysicsCharacterController function, it doesn't work.
Why can't I simply use the code below? It seems the built-in function doesn't allow combining the two?



Alternatively I would like to hear how people solve this perhaps not using this built-in function?? (also, yes, I want essentially diagonal strafing/movement, I don't want to rotate when not required as this is for a humanoid player, not a car LOL )
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 10th Feb 2018 23:27
No one???

I do have code now that combines the two using the d = 1-d trick and checking the d to move one of the two directions it must move....

....however now diagonal 'strafing' looks like a very harsh zigzag, instead of a nice diagonal "straight" line of movement.

Any ideas?? If this is an actual limitation of this AppGameKit function, I would reeeally love to see an expansion of the type of commands we can use more similar to RotateObjectLocal and MoveObjectLocal , but WITH the physics engine stuff.

I've tried to combine raytracing for the player and add a physics enabled mesh to that location, however it goes nuts when it is created within another model and the raytracing method requires the floor surface to have collision disabled to not 'freak out'.

... so I've given up on that 'work-around' and back at square one unfortunately. Having said that, I've now pretty much given up on the initial idea and am working with a rotating physics character controller after all. This kind of works well in terms of all of the physics related stuff fortunately, but is probably a bit less flexible than I would have hoped for.

Next up on the list are animations, because that sliding over the floor stuff doesn't look that good hahah.
LBFN
16
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 12th Feb 2018 20:35
I don't have AppGameKit, but couldn't you code the following to get you by until someone else answers?




So many games to code.....so little time.
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 15th Feb 2018 12:25
You should post this one in the AppGameKit section, this is the one for 3d art and stuff.
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 21st Feb 2018 01:54
Quote: "
if GetVirtualJoystickY(2) <0
if GetVirtualJoystickX(2) <0
Move3DPhysicsCharacterController(p1,2,20)
Move3DPhysicsCharacterController(p1,4,20)
endif
endif
"


I've noticed you post this before in a similar thread, but that does not actually work as the second command will never be started, nor does AppGameKit combine the two into diagonal movement.

It's where the d = 1 - d (called in your Do Loop) work around comes from with :
Quote: "if d = 0 then Move3DPhysicsCharacterController(p1,2,20)
if d = 1 then Move3DPhysicsCharacterController(p1,4,20)"


However, that results in very abrupt switching between the two directions in a 'stair' kind of way. What we need is a combination of these two, not a rapid switching.
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 21st Feb 2018 01:57
By the way, I think I can perhaps solve it using the rotate command for the character physics controller, but will have to do some more testing.

Login to post a reply

Server time is: 2024-03-28 21:48:29
Your offset time is: 2024-03-28 21:48:29