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"

Lock Location and Rotation?

Hello i use the VR Template in 4.15

My question is how i can Lock Location and Rotation except for one direction?

I want if i hold in hand a Billiard Cue lock this so that you can move the stick only in shock direction!

I hope you understand what I mean

Product Version: UE 4.15
Tags:
more ▼

asked Feb 14 '18 at 04:54 PM in Blueprint Scripting

avatar image

Mallory85
16 1 3

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

4 answers: sort voted first

Direction is a simple vector. If you know, for example, rotation of your hand, or rotation or Cue itself, you can get its direction by getting some of its vectors.

alt text

Then you need to implement its movement according to its direction vector. For example:

 Location = CurrentLocation + MovementDistance * DirectionVector

where MovementDistance is simple float value which means distance you want to move this object in current moment.

more ▼

answered Feb 14 '18 at 06:36 PM

avatar image

redbox
3.5k 77 11 96

avatar image Mallory85 Feb 14 '18 at 07:23 PM

can you explain this in more detail with an example?

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

I'm still looking for a solution

more ▼

answered Feb 27 '18 at 05:43 AM

avatar image

Mallory85
16 1 3

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

You can use Clamp Axis and Clamp Vector if you are using Blueprint or the FVector::Clamp & FRotator::Clamp function for C++.

more ▼

answered Feb 27 '18 at 07:16 AM

avatar image

Sreeragh
81 1 5 3

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

can you show me an example how to use this?

more ▼

answered Mar 01 '18 at 06:35 AM

avatar image

Mallory85
16 1 3

(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