ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Help with CopperCube
forum topic indicator Help! How to implement side strafe for a third person camera.
person icon
facept
Guest
Quote
2025-03-17 17:08:10

Hello devs. I was wondering if there's a good trick to implement right and left strafe for a third person controller, instead of the usual rotation.

person icon
sam_grady
Registered User
Quote
2025-03-17 18:36:47

For this, it’s better to use a custom controller that allows movement in eight directions rather than the standard tank controls of CooperCube.

Unfortunately, I can’t recommend anything specific since I haven’t used anything like this from the internet, but I’ve heard a lot about the controller from @SamMhmdy - I think it has what you need.

person icon
Facept
Guest
Quote
2025-03-18 12:32:14

Thank you for suggesting that controller, it's pretty darn good! But sadly, I still can't figure out how to create a strafe.

I've tried changing the position of the character node by 'Vector' or 'Vector into facing direction' and had some very minimal success (very very minimal though).

I'm definitely missing something, but I'm pretty lost at this phase x_x

person icon
sven
Registered User
Quote
2025-03-19 14:55:29

i havent tested but maybe changeing rotation speed to 0 (if its possible) first (when key a or d down) then move by vector.. so it wont try to rotate at same time when trying to do strate.. (doing rotation at same time cancels the desired effect of move my vector) ..even if it works it wont be best solution..

if i have time i upload script that does strate instead of rotation.

person icon
hadoken
Registered User
Quote
2025-03-19 20:06:30

@facept

Do you mean strafe like in my modification of @SamMhmdy's
Thirdperson Controller that I posted a while ago?

https://ambiera.com/forum.php?t=...

https://www.dropbox.com/scl/fi/7...

embedded external image
🔎︎


person icon
Facept
Guest
Quote
2025-03-19 21:17:14

@hadoken

Your modification is almost perfect! That's the strafing I'm trying to implement haha

Though I could see another challenge, making the strafe work while going along a diagonal direction.

Did you use code or is it all tweaking from the default behaviour/action options?

person icon
hadoken
Registered User
Quote
2025-03-20 15:38:47

@Facept

my modification uses pure code from a heavily tweaked "behavior_smThirdpersonCameraController.js" script originally written by @SamMhmdy for camera/mouse looking

plus another custom script of mine for movement and rotation of the player with strafe mechanics (with similarities to the FPS movement controller extension I provide with my CopperCube VR Setup on itch.io: https://hadoken-records.itch.io/...)

person icon
guest_guest_gues
Guest
Quote
2025-03-26 10:33:45

@Facept

Can't you turn on the alwaysFaceCamDir option in @SmnMhmdy's ThirdPerson Controller to achieve the effect?

person icon
Facept
Guest
Quote
2025-03-26 20:09:15

Thank you for suggesting Guest_guest, but sadly it didn't create a strafe mechanic.

I think I'm going to stick with the normal tank control, and try to create retro styled (psx era) game. Something similar to Nightmare Creatures should be quite fun to do!

person icon
serge
Registered User
Quote
2025-03-27 11:21:57

I create a right and left control but it's simple. I use on a car game I made. I use the script called do something every ms.


Create reply:










 

  

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


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






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