Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Strange Player Movement Upon Switching Scenes

Eon
Guest
Quote
2024-03-15 01:37:09

I am having an issue where I walk into a door with a behavior to change the scene when collided with. The scene it switches to also has a door with a similar behavior that switches back to the scene you came from. I have a 3rd person camera setup with a player model prefab in both rooms.

The issue is that about half the time when I switch rooms (just walking through the door repeatedly) The player in the new scene starts to spin around or move forward or BOTH. The is usually resolved by simply activating the controls, but it is highly unwanted behavior that I cannot pinpoint the reason for happening.

I have tried to set an action on the scenes that reset the behavior for the player, to no avail. I dont really know what else to try. Any help or guidance here would be greatly appreciated!


vp
Guest
Quote
2024-03-15 14:48:34

without seeing it, it's difficult to diagnose the problem, but as you mentioned collision, try starting the player slightly above the ground when the scene starts- it may be that the player's collision elipsoid is entering the scene, inside the collision zone (ie already colliding) - you don't want that.


vp
Guest
Quote
2024-03-15 14:50:49

..also, if you have any static 3d object childed to the collide-when-moved parent, you need to disable collision for the child.


Guest
Guest
Quote
2024-03-15 21:04:56

@Eon

The problem is your key inputs from one camera is flooding into the next camera. It's a known issue. To fix this when you transition don't go directly to the next camera. Try switching the screen to a simple camera childed to your main camera like a load screen. This will break the input flood. I use a script to make my child camera follow the target of the main camera so it appears like the camera just froze before fading. If you need the script just let us know.


Eon
Guest
Quote
2024-03-18 06:17:22

These are excellent suggestions, especially the one about camera input flooding. I will try to implement a fix based on this and get back with the results :D


Eon
Guest
Quote
2024-03-25 20:42:05

I have tried all of the mentioned suggestions; Elevating the character/collider upon entering a scene, childing a camera and switching them around during a transition, messing with the collision setting on everything... Still not working. :( Such a dumb bug.


Guest
Guest
Quote
2024-03-25 22:34:11

@Eon

Send me your CCB file and I will try and fix it for you.


Eon
Guest
Quote
2024-03-26 01:32:16

Guest wrote:
@Eon

Send me your CCB file and I will try and fix it for you.


How? It just shows you as a guest, I cant click on your profile nor see a section to post attachments.


Guest
Guest
Quote
2024-03-26 01:39:32

@Eon

Zip up your folder and post it on this site:

https://catbox.moe/

Then paste the link it gives you here.


Eon
Guest
Quote
2024-03-29 15:05:49

https://files.catbox.moe/sch64g.ccb

Thar she blows, Cap'n


Guest
Guest
Quote
2024-03-29 21:55:22

Unfortunately, I'm primarily a first-person perspective kind of person. I didn't end up using your character, but this is the best I could get scene transition without that crazy behavior. There is something about walking backwards into the On Proximity behavior that causes that auto-walk issue. I could get it to reliable do it just spawning in the scene and walking backwards. There's a hitch when the camera's behavior is restarted. Other than that, it works well. I'd say if you want to cover up that hitch, your best bet is to fade the screen like I mentioned above. I didn't have time to get around to it today. If that is done, or some type of load screen, then it's perfect. Hope this helps.

https://files.catbox.moe/ii3040....


VP
Guest
Quote
2024-03-30 11:28:04

Are you using the default/built-in camera and movement behaviours or a 3rd-party plugin?


Eon
Guest
Quote
2024-03-30 23:32:53

@VP its all the built in stuff. Also Guest thanks for checking this out and Ill look at this file and see what's up and if I can integrate it :)


Eon
Guest
Quote
2024-03-30 23:46:47

The confusion I think people were having is that they expected my movement controls to be attached to my camera, which they aren't. Using inspiration from Guests file, I tried simply resetting the player scene node (which houses the controls) before switching scenes, and this appears to have fixed the bug.

Wonderful!


vp
Guest
Quote
2024-03-31 00:39:25

From what I can see from your original file, it's not really a bug.

You've added a character with collision but no floor or terrain for him to collide with. It's going crazy simply because gravity is set to 10, the character is just falling quickly through infinity and the camera is chasing him.

Try adding a collision mess(floor plane) or a terrain.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internatio?al" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact