Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Moving platforms?

A topic by RodZilla created 42 days ago Views: 130 Replies: 3
Viewing posts 1 to 2
Submitted (1 edit)

I'm trying to create a moving platform with the new Godot XR tools addon, but have all kinds of problems. If I just create the platform as a static body, the player does not follow motion. Sticking the xrorigin to the platform with a remote transform helps, but hands behave erratically when the platform moves.

Is there a standard way for moving platforms in VR?

Jam Host

Still something that I want to dive into some day. With XR Tools having XROrigin3D as the root of the character, and the player body attempting to follow, you're really fighting physics.
With Development Kit using a CharacterBody3D as a base, it should piggy back on the platform support in Godot, and there is logic to ensure character body movement is applied to the hands as well, it's however not perfect..

Submitted

I'm using Development Kit, and the character body follows moving platforms only on the vertical axis. ;(

Jam Host

Been giving this some more thought. With Devkit obviously Godot built in platform logic won't work seeing we use a raycast to adjust the vertical placement of the player, so the capsule never touches the ground.

If the ability to do things like climb stairs doesn't matter, you could do away with the raycast body node, and just add  your own full height capsule collision shape.

Else like we talked about on stream, we'll need to enhance the logic to detect what surface we're standing on, get the velocity of the surface, and take that into account with applying friction to the body movement.