Camera misbehaving when attached to physics objects

Hi all. This is my first post, so apologies if it is something that has already been asked. I have searched.

I’m trying to make a helicopter game, but no matter what I try, I can’t get the camera to behave. It just seems to fall out of the helicopter.

The share link is here:

Controls are WASD. Spacebar+W/S to make the helicopter climb or fall.

You can see all the various blocks I have tried to fix it (they have been disabled) but nothing has worked.

Any help would be greatly appreciated!

Kind regards,

Hi @sety, great idea for a game! Is the Camera attached to the person & helicopter? Which are you moving? If you can make the game remixable, this will make it easier for others to help you debug your issues.

Geoff @ TechLeap

Oh sorry. I didn’t realise it wasn’t mixable. Try this:

The camera is attached to a person who is attached to the helicopter seat. The camera was at first attached to the helicopter seat. Attaching the camera to the person was just an attempt to fix the problem, but it didn’t work. Thanks :slight_smile:

Yes, I had a similar issue a few years ago when I created this demo:

It has really weird behaviour which I haven’t found an explanation for, and couldn’t be bothered harassing the CoSpace devs to explain. I just moved on to different projects or simpler solutions.

@Luc any thoughts?

Edit: Changed “Space” modifier to “Enter” to make it compatible with ClassVR

@techleapnz Unfortunately I can’t seem to figure it out either, tried fixing it with typescript, turning off the collision for the cam and using placeholder objects for position/direction, even adding the heli model as child to an invisible object that manages the physics, figuring that atleast the displacement would happen equally to both the camera and the model but still no luck.

It does indeed seem to be an issue behind the scenes, specifically with the rendering, since all the local positions seems to stay the same regardless of who parent’s who, yet visually the camera will always be displaced over time if it is child to a physics object.

Thanks for looking into this! I was worried I was doing something wrong, as I’m new to cospaces.

Strangely enough, the camera does not seem to ‘fall’ from its attachment point when using ClassVR to look around, (although it does still drift when using directional controls)

On a side note, remapping the modifier from “Space” to “Enter” to make it compatible with ClassVr did not work. The classvr controller’s “OK” button sends scancode 1c (enter) when plugged into a PC, so I thought it would work. A lot happening behind the scenes that I don’t know about. :frowning:

I do hope the devs are active and are looking into issues like these. I would hate for our Year 7s to have their creativity limited, or even be put off game development if they hit as many walls as I have evaluating this product for them.

Thanks again :slight_smile:

@CoSpaces_Edu Another one for devs to investigate or comment on.

Thanks for bringing this to our attention - we’re currently looking into it!

1 Like