Unity3D Tutorial #77 [ Click & Rotate Objects ][ Free Script Included ]

preview_player
Показать описание
Programming a click and rotate objects in unity3d.

Follow On
Рекомендации по теме
Комментарии
Автор

Wow. I finally found something online that does exactly what I wanted (and expect) it to do. Thanks a million, Jesse! Great job!

jdvcreative
Автор

Glad you got it working Just use OnTriggerEnter to enable this rotate script on the object and then disable the script when the User exits the trigger.

JesseEtzler
Автор

I forgot to put the variable private var yDeg : float; updated the script. So if it doesn't work that's what it's missing.

JesseEtzler
Автор

It would work just like the xp system. But yes planning on making a more advanced shop system for the Dota style game.

JesseEtzler
Автор

If you follow my FPS tutorial series you will learn a lot. You don't need to lock the cursor, you hide the cursor and then send raycasts from the center of the screen.

JesseEtzler
Автор

what did you make the character in and cool vids.

morgan
Автор

Hey what about a tutorial for how to add currency to your game so you can get it from killing monsters and it displays on screen, it would also help if you could make a second part for a shop and buying items.

UnleashTheBanana
Автор

Just use forward acceleration and rotations

JesseEtzler
Автор

You may of copied it wrong. What's the error?

JesseEtzler
Автор

I know!
As soon as I add the script into my project, not even adding it to a GO, it shows a compiler error.
When I empty the script unity runs fine.

garcesdesign
Автор

can you please tell me the code to lock the cursor to the center of the screen please?, I'm making a FPS, also nice videos! i sub'd

HardICoreIGoat
Автор

Wow! Thanks man! 

Now how do you make it so that It will rotate in the center instead of on the edge of the object? or just change the pivot point of the object? thanks!

Anyway Thanks again! 

robertbryanmandin
Автор

In line 7 you declared:
private var YDeg : float;

But you call yDeg

Changing line 7 to:
private var yDeg : float;
Solves the problem. Should have paid more attention, sorry.

If you don't mind my troubling you, how do I make it so your script is triggered when hit.collider == collider (when left clicking on GO and then rotating it past its collider?

Thanks!

garcesdesign
Автор

Great but the script won't work in 4.2
Thanks!

garcesdesign
Автор

How do you do the same thing but in a certain rangw

pyotrlye
Автор

sir, can you make tutorial flight simulation?
and also make vertical speed indicator like this video
watch?v=j_L9sUEA570
I really need your help.

GreenNeoflies
join shbcf.ru