Rotation and movement a specific value - CIV control like

Dear Ladies and Gentleman,

I´m combing through tons of Forums, YT and the whole Internet and i couldn´t find a solution for my Problem.
If there is a thread in this Forum SRY but no Chance for me to find it.

I want my Cube to move Forward while executing a Rotation when pressing the “W” f.e. But I want the distance and the Rotation to be limited so that the cube Rotation always Ends on a plane side. So everytime i press W the cube moves “1” Forward and rotates “90°” but with some steps between 0° and 90° and the distance.

THX in advance

if keypress “W”-----and------------‘Move’=1
if ‘Move’=0---------/ -----------Rotate 1 degree
if ‘Move’ min:1 max 89-----and–/
_______________________------add 1 to ‘Move’

if move = 90 -----and--------------‘Move’=0

Example

note

motion= Move .02 on X axis (world) + 1 degree rotation

Attachments

MoveExample.blend (420 KB)

Thank you very much… One Week vs. 10 minutes ? :eyebrowlift2:

THX…

You can even define an action (with location and rotation keyframes) and simply play this action :wink:

I thought about this option too but i had problems to restart this action everytime i press the key again.

1 minute actually. W key to move.
CubeAction.blend (512 KB):slight_smile:
The important thing is to press the Add button in the action actuator.

Mine can be repeated, or control a sequence.

You can also control animations/actions with properties.

Tried to learn something in the meanwhile - The add button was quite a good hint. :stuck_out_tongue:
But I still got the Problem that i cant avoid a diagonal movement if W and A are pressed simultaneously. Not even with a XOR Controller. I had to think on.

Attachments

Cube v3.blend (691 KB)

Tried to learn something in the meanwhile… Thanks for the hint with the add button :eyebrowlift: HELPS!!!

Still have a Problem with the directional movement. Cant avoid it if two Buttons are pressed simultaneously. I tried it with an XOR Controller but no solution… hm… Thinkin on…

[ATTACH]272125[/ATTACH]

Attemp #4:

I tried to learn something in the meanwhile but still have Problems with the diagonal movement.
How can i avoid to press two Buttons at the same time. I tried it with a XOR Controller but that doesn´t work.

[ATTACH]272156[/ATTACH]

I tried to upload a post with my blend but it seems that it wont work. Hmmm well OK no blend just text.

I still have Problems with the diagonal movement.
How can i avoid to press two Buttons at the same time. I tried it with a XOR Controller but that doesn´t work.

Better with animations ?

OK - No Chance to block the diagonal movement. I tried several ways… Python ?

are you creating a bloxorz-like kinda game? hehe

DAMN… Never heard of that before… Yes nearly the same Thing… Hmm… But this just a preparation for something bigger (MAYBE) :slight_smile:

I found a Solution… (If someone is interested)… SET State…

if UpDown =0--------
if LeftRight = 0-----and-----------UpDown =1
keypress up---------/

if LeftRight=0--------
if UpDown = 0------and----------UpDown=-1
keypress down------/

:smiley:

Attachments

StateLess.blend (429 KB)

Mmmhh… I think mine works better… :eyebrowlift:

CB.blend (885 KB)

Is it possible that Blender calculation makes mistakes ?

Sometimes the property equal XX does not Trigger my Controller.

In other words: In State 2 if property FWD equals 15(finished Rotation) than set state to 1. But sometimes this doesn´t work and i Need to execute another Rotation.

Although it only is a discussion with my self I found the solution for this Problem. Only one Problem left : How can i override the order of logic bricks ?
Mmmmhh i have the Feeling i Need to figure it out on my one. :slight_smile: