≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
I used a script that fixes a problem related to horizontal rotations. Please modify it so it also works for vertical rotations!
Posted by:
(you are not logged in)
Enter the missing letter in: "?nternational"
(you are not logged in)
Text:
[quote][b][/b] wrote: It maybe possible that am wrong...... But i read the last post of this thread.... @Wildmaster.... You are saying that you want a chracter to rotate according to the another character in the game... Am i right? If i gussed it right then.. let me tell u the method, i usee to play. Around few months ago... While i was busy in creating a behavior ... Path follow for my character.. But as the animated nodes doesn't have collision , so the calcularion to nearest path to reach enemy doesn't work out for me.. But the rotation and character follow works... And i simply used ...[code] Var tiny_object = ccbgetscenenodefromname(tiny_object) Var tiny_rotation = ccbgetscenenodeproperty(tiny_object,"Rotation") Var player = ccbgetscenenodefromname (player) Var player_rotation = ccbsetscenenodeproperty (player,"Rotation", tiny_rotation.x,tiny_rotation.y,tiny_rotation.z);[/code] That way the player will rotate relatively with tiny invisible object in ur scene.... If possible i will tomarrow send u a ccb file too... Just use the code with every fewseconds do something behaviour... And if you wan to create your own Ai and then wants them to rotate with a fixed focua on another scenenode... Then there are some more complicated ways to do it... For example you have to calculate the position ... If player position is negative and ai position is in positive or more than Player position... Then the rotation will be just negative of the player rotation... Suppose enemy is standing in north... And palyer is also facing in the north direction .... Then the enemy rotation must be negative ...so that it will follow the south direction.. amd face towards player... Hope you undertsand what am trying to say... Am not at all good in explaining... Sorry for my bad english.... *hmpf*[/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