# Setting an entity's speed

This seems like more of a general JME question, which is why I'm not posting in the physics forum.

I'm working on a specialized engine layer atop JME. One of my design goals for this layer is an Entity class with a more simplistic interface to the underlying spatials. For instance, I have methods for getting/setting yaw, pitch and roll which drill down into the object's spatial and perform the requested operations.

My next goal is a method for setting speed, where "speed" is defined as the magnitude of an entity's velocity. I'm getting tripped up here, however. I'm implementing arcade physics, so the direction of the velocity vector is the direction which the entity is facing. I've been using toAngles() on the rotation quaternion to obtain angles for the entity's direction of motion for things like displaying headings, but I'm not sure how to obtain a directional vector from the rotation quaternion without using trig, which I could if I needed to but this seems like it'd be somewhat ugly and inefficient.

Pointers? Are there any quick ways of extracting a vector representing the direction faced from a rotation quaternion?

I use this to set a force in the direction skateboard is facing, is that what youre looking for?

```Vector3f direction = new Vector3f();          deckPhysicsNode.getLocalRotation().getRotationColumn(0, direction);          deckPhysicsNode.getLocalRotation().getRotationColumn(1, direction);          deckPhysicsNode.getLocalRotation().getRotationColumn(2, direction);              deckPhysicsNode.addForce(direction.mult(-2000f));```

Quite possibly. Thanks for the pointer; I'll have to play with it and find out.

What exactly does getRotationColumn() return? I'm struggling to think in terms of matrices/quaternions, and am used to thinking in terms of pure vectors.