generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Hey you math geniuses

Previous Thread :: Next Thread 
redfart is not online. redfart
Joined: 17 Oct 2008
Total Posts: 1021
04 Jun 2013 03:25 PM
offset=(Torso.Position.y-mouse.Hit.p.y)/80
mag=(Torso.Position-mouse.Hit.p).magnitude/100
offset=offset/mag
neck=Torso.Neck
neck.C0=necko*CFrame.fromEulerAnglesXYZ(offset,0,0)

Basically what this is, is setting the C-Frame of the neck to point where the mouse is aiming. But the problem is, is it isn't perfectly accurate. Like if your zoomed in, and you point up, the head's angle won't stay constant. It'll only move a little. Or if you change the division of the 100 and 80 it'll be really sensitive, or not at all, ect.

Anybody know an equation that WOULD make it stay constant?
Report Abuse
Flash77 is not online. Flash77
Joined: 14 Jun 2008
Total Posts: 550
04 Jun 2013 03:32 PM
Try using a parabola, that is if the problem is the head moves too much when object you are looking at is to far/close with the opposite when the opposite conditions.
Report Abuse
redfart is not online. redfart
Joined: 17 Oct 2008
Total Posts: 1021
04 Jun 2013 03:37 PM
That's exactly my problem

How would I use a parabola? Wouldn't that just repeat the problem?
Report Abuse
Wowgnomes is not online. Wowgnomes
Joined: 27 Sep 2009
Total Posts: 26255
04 Jun 2013 03:38 PM
The problem is with the roblox engine, mouse movements are not accurate enough.
Report Abuse
redfart is not online. redfart
Joined: 17 Oct 2008
Total Posts: 1021
04 Jun 2013 03:40 PM
But it's done perfectly at "Battlefield"

www.roblox.com/--place?id=114127058
Report Abuse
galvinio is not online. galvinio
Joined: 30 Jun 2011
Total Posts: 222
04 Jun 2013 04:36 PM
That's cause DeadZoneZack is a genius... :l
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image