≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Problem with drawn rectangle
Posted by:
(you are not logged in)
Enter the missing letter in: "Int?rnational"
(you are not logged in)
Text:
[quote][b][/b] wrote: Example ccb download: [url]https://drive.google.com/file/d/1IP7IHoQI5F3BsycHnUqeB1ywEjvavF1K/view?usp=sharing[/url] [code]/* <behavior jsname="behavior_aim" description="Look how bullet will fly"> <property name="StartPoint" type="scenenode"/> <property name="EndPoint" type="scenenode"/> <property name="Crosshair" type="texture"/> <property name="Crosshair_Size_X" type="float"/> <property name="Crosshair_Size_Y" type="float"/> </behavior> */ p2d=0; behavior_aim = function() { }; behavior_aim.prototype.onAnimate = function() { var SP = ccbGetSceneNodeProperty(this.StartPoint, "PositionAbs"); var EP = ccbGetSceneNodeProperty(this.EndPoint, "PositionAbs"); var Col = ccbGetCollisionPointOfWorldWithLine(SP.x, SP.y, SP.z, EP.x, EP.y, EP.z); if (Col == null) { p2d = ccbGet2DPosFrom3DPos(EP.x, EP.y, EP.z); } else { p2d = ccbGet2DPosFrom3DPos(Col.x, Col.y, Col.z); }; } function onFrameDrawing() { ccbDrawColoredRectangle(0x77ff0000, p2d.x - 100, p2d.y - 100, p2d.x + 100, p2d.y + 100); } ccbRegisterOnFrameEvent(onFrameDrawing); [/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