Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Help with vertical rotation via mouse

Registered User
2023-03-19 10:24:39

Hi, I want to be able to rotate my character on the X axis only with the mouse, could someone please help me? I'm creating a a third person shooter with flying, I want to aim and shoot so if i pull up/down, the character rotates with the mouse!

2023-03-19 12:18:45

Are you sure that you want to make the character rotate vertically, won't it look weird? I can imagine that it will make it as if the character is weirdly flying in mid-air when it rotates vertically. as If Ronald Weasely ( the guy with orange hair in harry potter) has cast a wrong Wingardium Leviosa on the character.

Still, you can try some behaviors available on to rotate object with mouse, or you can try parenting and unparenting the character to the camera when you want the player to follow the camera movement vertically.

Registered User
2023-03-19 17:58:19

This kind of movement is more or less what i'm looking for. Everything operates in low gravity, so everything will be floating around.

The x axis is locked to the mouse so you can rotate the character in relation to the mouse looking.

I've tried the mouse rotation asset from the site you suggested but it only works when clicking a mouse button, and it moves instantly instead of smoothly.

Any other alternatives? I've tried even making the model rotate when the mouse hovers over a child sphere. It sort of works but if you're moving the mouse too fast it gets locked in rotation.

Registered User
2023-03-19 18:56:37

Here is my test script i made week ago.
To make it real smooth you need to do some scripting ( depends how smooth you need it)

Example project with simple script.

script allows you to execute action if mouse moved Up/Dwn/Lft/Rgt that means you can call rotate action on mouse movement.

Use mouse to rotate sleepwalker..WASD to walk as usual 3RD person player ..mouse left to shoot.

Registered User
2023-03-21 17:26:04

Thank you sven! It works incredibly well for what I needed. The only drawback was that it just didn't work at all with the SmThird Person Controller behavior. The camera wouldn't rotate anymore but the model did. I had to revert to the default third person follow camera to work with your script. Unless you had a suggestion to fix this?

Create reply:

Posted by: (you are not logged in)

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




Possible Codes

Feature Code
Link [url] [/url]
Bold [b]bold text[/b]
Image [img][/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]



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