| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
| head rotation; must be gettn old... | |
|---|---|
| Tweet Topic Started: Nov 10 2010, 09:01 AM (214 Views) | |
| RonBurgundy | Nov 10 2010, 09:01 AM Post #1 |
|
Forum Borat
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I'am having problems getting the head of a character to rotate relative to the position of another... point_dir=point_direction(x,y,guy.x,guy.y) if (point_distance(x,y,guy.x,guy.y)<10) { SetBoneRotation(12,0,point_dir,0) } ^does not work, the head does not move at all any tips? |
| !!! DEFEND POP PUNK !!! | |
![]() |
|
| alexw | Nov 11 2010, 09:07 AM Post #2 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
Are you sure its bone 12. Try getting the index with:
|
![]() |
|
| RonBurgundy | Nov 11 2010, 09:47 PM Post #3 |
|
Forum Borat
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I did use that and it gave me 12, thanks though. . |
| !!! DEFEND POP PUNK !!! | |
![]() |
|
| RonBurgundy | Dec 3 2010, 02:21 AM Post #4 |
|
Forum Borat
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Hate to be persistent but this is really getting on my nerves. Would this by any chance be affected by the order in which you put objects in the room? I am also using a bone transformation matrix for the seen character from the one not seen(through SetObjectRoom) to create a different position in camera view EDIT: Well bone transformation isn't the problem. |
| !!! DEFEND POP PUNK !!! | |
![]() |
|
| rangatangaa | Dec 3 2010, 03:15 PM Post #5 |
![]()
Elite Member
![]() ![]() ![]() ![]() ![]() ![]()
|
have you tryed removing the if statement to check what the problem is .. 10 seems like a small number to be dealing with.. i dont know your scale tho. |
![]() luenardi Should have been a mod ages ago. Dont touch my bottle of green cordial!!! My Facebook | |
![]() |
|
| RonBurgundy | Dec 3 2010, 09:56 PM Post #6 |
|
Forum Borat
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Yea I've tried that. I 've also tried another object, and a primitive insted of the guy.x,guy.y but did not work...so it has to be something with the player model. Create// camera.follow=id camera.distance=8 camera.perspective=2 height=10 file='models\ningrl.an8' LoadMesh(); scalx=.1 scaly=.1 scalz=.1 //SetObjectRoom(1999) //r_hand_bone=GetBoneIndex("bone00"); //r_hand_matr=GetBoneTransformation(-1,r_hand_bone); frame=0 speed2=.1 mouse_speed=0.05 can_talk=0 Step// GetMousePos(); camera.rotatex+=(global.mouse_y-display_get_height()/2)*mouse_speed; if(camera.rotatex<-30){ camera.rotatex=-30; } if(camera.rotatex>30){ camera.rotatex=30; } if camera.rotatey>360 { camera.rotatey=1 } if camera.rotatey<1 { camera.rotatey=360 } roty+=(global.mouse_x-display_get_width()/2)*mouse_speed; SetMousePos(display_get_width()/2,display_get_height()/2); camera.rotatey=-180; point_dir=point_direction(x,y,guy.x,guy.y); SetBoneRotation(12,0,point_dir); if keyboard_check_direct(ord("W")) = 1 { Move(0,180+roty,speed2); } if keyboard_check_direct(ord("S")) = 1 { Move(0,roty,.09); } if MouseCheckButton(mb_left) = 1 { if not instance_exists(cube){ instance_create(x,y,cube); } } if roty>360 { roty=1 } if roty<1 { roty=360 } Step(); Anything look wrong? |
| !!! DEFEND POP PUNK !!! | |
![]() |
|
![]() Our users say it best: "Zetaboards is the best forum service I have ever used." Learn More · Sign-up Now |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |





![]](http://z1.ifrm.com/static/1/pip_r.png)






9:12 PM Jul 11