Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,449 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 4 1 2 3 4
Re: Rotating a bone with mouse [Re: Ruben] #455344
10/17/15 02:30
10/17/15 02:30
Joined: Feb 2012
Posts: 371
Dico Offline
Senior Member
Dico  Offline
Senior Member

Joined: Feb 2012
Posts: 371
yes

Re: Rotating a bone with mouse [Re: Dico] #455345
10/17/15 02:39
10/17/15 02:39
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
@ Dico: I just sent you a PM.

Re: Rotating a bone with mouse [Re: Ruben] #455346
10/17/15 04:33
10/17/15 04:33

M
Malice
Unregistered
Malice
Unregistered
M



Well let Dico take over.

Notes - All ent_bone function pass(return non-zero), which means the bone, by name was found.
Ent_bonerotate (..constant*time_step) shows no visible results, which means the mouse input not the problem. last vertex move in med so have some attachment.

Mal out, peace

Re: Rotating a bone with mouse [Re: ] #455396
10/19/15 07:50
10/19/15 07:50
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
So, it turns out that I needed to place my ent_rotatebone() function after all the ent_animate() functions in my player_code() function. The ent_animate() functions were resetting the ent_rotatebone().

Big thank you to Dico who helped me figure this out. :-)

Re: Rotating a bone with mouse [Re: Ruben] #455397
10/19/15 08:08
10/19/15 08:08
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
put some cheese on the bone or get a dog laugh


Compulsive compiler
Re: Rotating a bone with mouse [Re: Wjbender] #455402
10/19/15 09:53
10/19/15 09:53
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
Right now, my code looks like this:

Code:
...

action player_code()
{
   ...

   ent_bonereset(my,"Bone");

   ...

   while(1)
   {
      ...

      ent_bonerotate(my, "Bone", vector(0,camera.tilt,0));

      wait(1);
   }

   ...

}



I hate to ask this, but is there a way to limit how far the player model using the ent_bonerotate() function will bend forward and backward at the waist (limit how much the waist bone will rotate?), independent of how far the camera will tilt and rotate behind the player? That way, if I look straight up, the player's head and shoulders will not block the camera's view looking straight up?

Re: Rotating a bone with mouse [Re: Ruben] #455426
10/19/15 17:46
10/19/15 17:46

M
Malice
Unregistered
Malice
Unregistered
M



http://www.conitec.net/beta/aclamp.htm
clamp(var x,var a,var b);


Code:
var limit =0 ;

while(x)
{
..... 

 limit=clamp(camera.tilt,0,90); //min max
 ent_bonerotate(my, "Bone", vector(0,limit,0));

..........
}



Beating a dead horse...

Re: Rotating a bone with mouse [Re: ] #455441
10/20/15 01:28
10/20/15 01:28
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
Thank you Malice. It worked.

Re: Rotating a bone with mouse [Re: Ruben] #455442
10/20/15 01:56
10/20/15 01:56

M
Malice
Unregistered
Malice
Unregistered
M



Welcome Ruben ..
Add Clamp() to your memory, you'll find many times you'll need it.
floor() and cycle() and abs() and sign() and of course random/random_seed(). All found in that same var arithmetics section of the manual, all very useful.

Page 4 of 4 1 2 3 4

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1