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 » Scripters
Home Search
 

Re: sight

Previous Thread :: Next Thread 
pidgey is not online. pidgey
Joined: 16 Jan 2008
Total Posts: 2739
27 May 2017 05:42 PM
kind of like setting the camerasubject, except the camera can move according to user input

like this goo.gl/81xaZg

how would i do this properly


Report Abuse
pidgey is not online. pidgey
Joined: 16 Jan 2008
Total Posts: 2739
27 May 2017 10:39 PM
bump


Report Abuse
pidgey is not online. pidgey
Joined: 16 Jan 2008
Total Posts: 2739
27 May 2017 11:59 PM
any1


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
28 May 2017 12:00 AM
move the weapons cframe to the proper location

the way turbo fusion does it is it finds the offset from the weld to the center of the head and then moves the weld
Report Abuse
pidgey is not online. pidgey
Joined: 16 Jan 2008
Total Posts: 2739
28 May 2017 12:01 AM
but hes a genius and im the opposite


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
28 May 2017 12:03 AM
how is the gun attached to the camera
constant cframing or welded to a part similar to the head?
Report Abuse
pidgey is not online. pidgey
Joined: 16 Jan 2008
Total Posts: 2739
28 May 2017 12:05 AM
is this a trick question

the gun was never attached to the camera

for that example i just used camera.camerasubject = sight


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
28 May 2017 12:06 AM
if u want the gun to follow the camera then attach the gun to the camera by cframing it and using an offset or by creating a part that will follow the cameras movements and attach the gun to that part via welds / motor6ds...
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
28 May 2017 12:08 AM
--exhibit A
local offset = CFrame.new(0.5,0,-1)
--running constantly...
gun.CFrame = camera.CFrame * offset

--exhibit B
local part = myPart --part that everythings welded to
--running constantly...
part.CFrame = camera.CFrame

Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
28 May 2017 12:09 AM
and if u wanna be even more detailed u can learn about 'springs' on the wiki for creating smoother rotational effects
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
28 May 2017 12:10 AM
if u wanna see a quick example of what most game developers do i can inv u to a tc and show u how its done considering were friends
Report Abuse
pidgey is not online. pidgey
Joined: 16 Jan 2008
Total Posts: 2739
28 May 2017 12:12 AM
but if i do that it offsets the handle from the tool and that causes terrible movement i dont get it


Report Abuse
pidgey is not online. pidgey
Joined: 16 Jan 2008
Total Posts: 2739
28 May 2017 12:13 AM
inv me to tc


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
28 May 2017 12:13 AM
because there needs to be a client model and a world model

u cant make it look good on both sides at the same time with just 1 model
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
28 May 2017 12:14 AM
thats why almost every first person shooter has low detailed weapons in third person and separate models for each
Report Abuse
pidgey is not online. pidgey
Joined: 16 Jan 2008
Total Posts: 2739
28 May 2017 12:14 AM
oh god you gotta to be kidding


Report Abuse
pidgey is not online. pidgey
Joined: 16 Jan 2008
Total Posts: 2739
28 May 2017 12:15 AM
thats true i did not know that


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
28 May 2017 12:16 AM
if u want a few examples u can try playing games like Phantom Forces, Nerf FPS, ROLVe games... all those games have pretty visible examples

now there is 1 way to avoid making separate animations for each but that involves still using 2 of the same model but just moving them differently
Report Abuse
pidgey is not online. pidgey
Joined: 16 Jan 2008
Total Posts: 2739
28 May 2017 12:17 AM
i have to rethink my existence


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
28 May 2017 12:18 AM
and the only reason WHY however is just because of the simple fact that if ur not using inverse kinematics and such for arm animations then when u start looking too high up or too low down the arms will 'pop' off of the torso looking unrealistic
Report Abuse
masterreblex is not online. masterreblex
Joined: 22 May 2012
Total Posts: 1014
28 May 2017 12:20 AM
Take the shot.
Report Abuse
pidgey is not online. pidgey
Joined: 16 Jan 2008
Total Posts: 2739
28 May 2017 12:21 AM
i like my keyframes, ill never be smart enough for ik

this was all pretty interesting though, thanks


Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
28 May 2017 12:24 AM
oh inverse kinematics can be a pretty easy concept, ill just simplify it for u here theres # #### to do it and this is the simplest way: LOC (law of cosines) basically it just means the arms are the 2 legs of the triangle and the distance between the start and the goal is the 3rd leg and u just solve for the angles to make the triangle with the arms between start and goal jacobians version however is more complicated and involves more complex trigonometry which i still have yet to study too :p but apparently what it does is it solves for the smallest angle based on a radius from the joint
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
28 May 2017 12:25 AM
oh inverse kinematics can be a pretty easy concept, ill just simplify it for u here

theres TWW.WWWW...WOOO ways to do it and this is the simplest way: LOC (law of cosines)
basically it just means the arms are the TWWWWOOO legs of the triangle and the distance between the start and the goal is the 3rd leg
and u just solve for the angles to make the triangle with the arms between start and goal

jacobians version however is more complicated and involves more complex trigonometry which i still have yet to study too :p
but apparently what it does is it solves for the smallest angle based on a radius from the joint
Report Abuse
pidgey is not online. pidgey
Joined: 16 Jan 2008
Total Posts: 2739
28 May 2017 01:28 AM
grade 11 applied maths with an 88% from copying friends and looking up answers and booked it and never looked at a math subject since. what does that have to say about my skills

however im interested in expanding my knowledge of programming so i might look into more advanced subjects to my standards soon


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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