x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Limit tank gun movement

I am making a tank game, partially based on the unreal tutorial on tanks, but they never discuss in the video how to prevent your rotating cannon from going 360 degrees around your tank, which as it so happens, is what is occurring with my tank.

Product Version: UE 4.10
Tags:
more ▼

asked Feb 25 '16 at 11:54 PM in Blueprint Scripting

avatar image

TheBlackRanger
10 1 4 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Try this

alt text

untitled.png (142.8 kB)
more ▼

answered Feb 26 '16 at 07:39 PM

avatar image

phoboz
1k 38 13 61

avatar image TheBlackRanger Feb 26 '16 at 09:37 PM

nah, still spinning

avatar image phoboz Feb 26 '16 at 09:40 PM

Are you sure you're using SET Rotation and not ADD?

Other than that, you're LookUp event must be constantly feeding you value > 0

avatar image TheBlackRanger Feb 26 '16 at 09:47 PM

Wait, never mind, its working now, thanks a lot!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Look at the Clamp Angle node. You can specify a maximum and minimum about of degrees for your turret and it will always stay within those values.

more ▼

answered Feb 26 '16 at 03:41 AM

avatar image

Andyfilms
18 2 3 6

avatar image TheBlackRanger Feb 26 '16 at 07:07 PM

well, obviously i didn't use it correctly because all is does now is continuously rotate around the tank, here's a pictalt texture of the blueprint.

clamp.png (228.2 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question