≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
How To Set Vertical Camera Limitation
Posted by:
(you are not logged in)
Enter the missing letter in: "?nternational"
(you are not logged in)
Text:
[quote][b][/b] wrote: there is many ways how to do it.. this version i made checks if camY is lower than camTargetY (you can adjust it -but make sure your cam pos is not in block zone at startup) Download project file with script i made. [url]https://drive.google.com/file/d/1QRZKt9J9TuqC_TxUV4SyqKKNHpoJ9equ/view?usp=sharing[/url] Script itself: [code]//Script by sven from ambiera forum. //for more stuff visit my youtube channel: //https://www.youtube.com/channel/UCN3jBL46fjoVrtGnpcnCO4w //also visit my itch page: //https://5v3n.itch.io/ /* <behavior jsname="behavior_C_L" description="CL"> <property name="Cam" type="scenenode" default="Camera1" /> <property name="AdjustH" type="int" default="20" /> </behavior> */ behavior_C_L = function() { this.ly=0; } behavior_C_L.prototype.onAnimate = function() { var clevel = ccbGetSceneNodeProperty(this.Cam, "Position"); var tlevel = ccbGetSceneNodeProperty(this.Cam, "Target"); if(clevel.y+this.AdjustH<tlevel.y) { clevel.y=this.ly; ccbSetSceneNodeProperty(this.Cam, "Position",clevel); } this.ly=clevel.y; return true; } [/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