{"action":"created","issue":{"url":"https://api.github.com/repos/chandlerprall/Physijs/issues/226","labels_url":"https://api.github.com/repos/chandlerprall/Physijs/issues/226/labels{/name}","comments_url":"https://api.github.com/repos/chandlerprall/Physijs/issues/226/comments","events_url":"https://api.github.com/repos/chandlerprall/Physijs/issues/226/events","html_url":"https://github.com/chandlerprall/Physijs/issues/226","id":54914326,"number":226,"title":"Setting a maximum velocity on object","user":{"login":"glennflanagan","id":5485364,"avatar_url":"https://avatars.githubusercontent.com/u/5485364?v=3","gravatar_id":"","url":"https://api.github.com/users/glennflanagan","html_url":"https://github.com/glennflanagan","followers_url":"https://api.github.com/users/glennflanagan/followers","following_url":"https://api.github.com/users/glennflanagan/following{/other_user}","gists_url":"https://api.github.com/users/glennflanagan/gists{/gist_id}","starred_url":"https://api.github.com/users/glennflanagan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennflanagan/subscriptions","organizations_url":"https://api.github.com/users/glennflanagan/orgs","repos_url":"https://api.github.com/users/glennflanagan/repos","events_url":"https://api.github.com/users/glennflanagan/events{/privacy}","received_events_url":"https://api.github.com/users/glennflanagan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chandlerprall/Physijs/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-20T17:39:03Z","updated_at":"2015-01-21T10:39:29Z","closed_at":null,"body":"Hi there I am working with a simple box which I'm applying an impulse each frame to get it moving using \r\n\r\n```javascript\r\ncharacter.applyCentralImpulse({x: 1, y: null, z: null});\r\n```\r\n\r\nHowever I want to restrict it's velocity in a direction so it doesn't just fly off - but I can't figure out a way of doing this as I can't find anything in the documentation.\r\n\r\nIs this possible with Physijs?"},"comment":{"url":"https://api.github.com/repos/chandlerprall/Physijs/issues/comments/70816542","html_url":"https://github.com/chandlerprall/Physijs/issues/226#issuecomment-70816542","issue_url":"https://api.github.com/repos/chandlerprall/Physijs/issues/226","id":70816542,"user":{"login":"glennflanagan","id":5485364,"avatar_url":"https://avatars.githubusercontent.com/u/5485364?v=3","gravatar_id":"","url":"https://api.github.com/users/glennflanagan","html_url":"https://github.com/glennflanagan","followers_url":"https://api.github.com/users/glennflanagan/followers","following_url":"https://api.github.com/users/glennflanagan/following{/other_user}","gists_url":"https://api.github.com/users/glennflanagan/gists{/gist_id}","starred_url":"https://api.github.com/users/glennflanagan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennflanagan/subscriptions","organizations_url":"https://api.github.com/users/glennflanagan/orgs","repos_url":"https://api.github.com/users/glennflanagan/repos","events_url":"https://api.github.com/users/glennflanagan/events{/privacy}","received_events_url":"https://api.github.com/users/glennflanagan/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T10:39:29Z","updated_at":"2015-01-21T10:39:29Z","body":"So my character also is able to jump where I am applying an impulse on the Y axis.\r\n\r\n```javascript\r\ncharacter.applyCentralImpulse({x: null, y: 15, z: null});\r\n```\r\n\r\nAnd to limit the velocity on the X axis I would need to do something like this\r\n\r\n```javascript\r\nif(character.getLinearVelocity().x > 15){\r\n    character.setLinearVelocity({x: 15, y: null, z:null});\r\n}\r\n```\r\n\r\nBut the issue I have with that is it causes the character to float when it's 'Jumping' and you set the velocity on the X axis passing null as the Y and Z values.\r\n\r\nAm I approaching this the wrong way or are there other Phyisjs methods hidden away that I'm not aware of?\r\n\r\nThanks\r\n\r\n"}}