≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
3rd Person Player & Camera Controller 2021
Posted by:
(you are not logged in)
Enter the missing letter in: "Interna?ional"
(you are not logged in)
Text:
[quote][b]csp-games[/b] wrote: Indeed, the 3rd person shooter extension by Niko shows a way to deal with it. As I understand from "Rotates the character to where the mouse is", it uses the 3D coords of where the mouse xy hit the world ( ccbGet3DPosFrom2DPos(x,y) ), then uses Math.atan2 to calculate the angle the player should be rotated on the pitch angle. It isn't mouselook per se, but certaily a way to make a playable game. You can then aim at enemies by moving the mouse over them, or some 2d overlay, decal etc. However, as soon as the camera moves behind the player, the mouse xy would point to a diffrent 3d location, requiring to add a click / mousedown condition or something like that. With the mousedown condition you can also implement mousespeed, as the user can bring the mouse back on the canvas while not holding the mouse down. So that is an option too. Like the controls in the editor, just smoothed. For an adventure I probably would rather combine cursor rotation and walk-to clicked location.[/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