≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
3rd person camera without Coppercube
Posted by:
(you are not logged in)
Enter the missing letter in: "?nternational"
(you are not logged in)
Text:
[quote][b][/b] wrote: I've got the camera moving on the Z axis correctly. The issue is now with the X axis. When I try to position the camera it seems to rotate instead. The camera always seems to want to look at the center of the screen. [code]document.on keydown = function(event) { var key = String.fromCharCode(event.keyCode); if (key == 'W') boxnode1.Pos.Z += 10; if (key == 'S') boxnode1.Pos.Z -= 10; if (key == 'A'){ boxnode1.Pos.X -= 10; cam.Pos.X -= 10; // <-- this is the issue } if (key == 'D') boxnode1.Pos.X += 10; cam.Pos.X += 10; // <-- this is the issue } cam.Pos.Z = boxnode1.Pos.Z - 100 engine.handleKeyDown(event); }[/code][/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact