Hello,
I have only been using C3 for 2 days now so I am still getting familiar with behaviors and events and wasn't sure how to implement the movement I wanted so I used javascript.
The movement is very simple 8-directional with no rotation unlike the built in behavior.
// get keyboard input
if (Keyboard.isKeyDown("KeyD"))
Player.velocity.x = 1;
if (Keyboard.isKeyDown("KeyA"))
Player.velocity.x = -1;
if (Keyboard.isKeyDown("KeyW"))
Player.velocity.y = -1;
if (Keyboard.isKeyDown("KeyS"))
Player.velocity.y = 1;
// move player
Player.x += Player.speed * Player.velocity.x;
Player.y += Player.speed * Player.velocity.y;
So the movement works as I expected but collisions don't appear to work, do I have to react to collision events using javascript now? Also how can I do so without causing flickering of the character?