Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Simple car movement please help

expexp
Registered User
Quote
2018-10-31 21:22:00

I made a simple car object ( from prefab) and 3rd person view camera and added behaviour controlled by keyboard. So the camera stands behind and rotation of car is good BUT when I hit W - it moves not forward by to the right. I've tried to fix it but still can't.
[URL=http://pixs.ru/showimage/Snimok22pn_2616989_30908095.png]
🔎︎
[/URL]


behroz-khan
Registered User
Quote
2018-11-01 11:27:15

Hi, I also experienced such problem. But the solution is too simple!
Just:
Go to the 3rd person Behavior and at the "Additional Rotation", Add 360°
Hope it worked for you!


expexp
Registered User
Quote
2018-11-01 18:44:55

wrote:
Hi, I also experienced such problem. But the solution is too simple!
Just:
Go to the 3rd person Behavior and at the "Additional Rotation", Add 360°
Hope it worked for you!

Tried 360 - nothing changed. Tried 90 - moves forward when I press S(down).... 270 solved the problem. Tnx.


expexp
Registered User
Quote
2018-11-01 19:17:36

I have one more question: How can I change the behaviour controlled by keyboard so that when pressing "back" the car was not moved back right at the moment but just slowed its current movement ?
And how can I get access to variables such as MoveSpeed or AccelerationSpeed to change them in gameplay
🔎︎



behroz-khan
Registered User
Quote
2018-11-02 13:36:24

Sorry for my wrong answer.
The MoveSpeed is present in the moved by keyboard behavior.
🔎︎



just_in_case
Moderator
Quote
2018-11-07 23:49:41

You can acees the movement speed by using the global variable
Hashtag player.movespeed

Here palyer is the name of your scenenode and there will be a symbol of hashtag befor the player name and there is jo space after the hashtag...

We are not allowed by the forums to write taht symbol... Sorry fpr that...
And to decrease the speed on pressing the back key...

You can setvariable on a key press...

If a key press (back) set a variable deacellerate value = true or 1
Whatever you want...
And then use every few secomds beahavior if variable has a value
Variable name = deacellerate and value true then do something...

Then execute another action... Set or change variable
Variable name = hashtag player.movespeed
Subtract
Value=0.5

Or whatever you want this is just the idea the actual values and variable names may vary except the global variables name.
It depends on you ... What value you want to you and all..
You can do the same with forward key press... To increase the speed and all...


Hope you understand and hope that it helped...


behroz-khan
Registered User
Quote
2018-11-08 11:11:20

Oh!!! We can also use global variables....
I just forgot...


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internationa?" (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