Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi... incase you see this Nico (or anyone who has the power to do this)... one suggestion for the "Object or Person controlled by keyboard" Behavior. The suggestion is that the Move Speed be broken into Forward Speed, and Backward Speed. This will allow the user to control the speed of both directions. In my case.. I would like to have my object NOT move backward. If there was a forward and backward value, I could simply set backward to 0. Anyway... something to consider (I hope). Thank you, M |
||||
|
Hi morbott, you are right, this is necessary, but i think you can plan a workaround by executing a javascript when the down arrow key or S is pressed, to decrease movement speed=0, this might not affect the animation but there is a way to gain control of the player's animation, with the most helpful being,child the animated node to an invisible node and put the controlled object by keyboard behaviour to the invisible node, hence you have the ability to set the animations manually All this is kinda a lot of work. it would have been simpler if what you suggested was actually implemented though |
||||
|
Can you change an attribute of a behavior with Java script? If so, are there any examples I can look at? This might be going beyond my skill level. :( But I'll try if I can see an example. |
||||
|
Simple example of code to set the movement speed when moving backward:
|
||||
|
@wing With that code you can press both "s" and "arrowdown" and then after releasing one of two but holding the other move with forward_speed backwards. I believe, you have to use two flags anyway. |
||||
|
You’re totally right, I didn’t notice that. I somehow missed the fact that two buttons control the behavior. I didn’t even test the arrow keys - just instinctively tried everything with WASD |
||||
|
np:) I only noticed because I made the same exact mistake with sprint behavior |
||||
|
|