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"

Character as cube?

How would I go about having my character be a cube in BP? Third person obviously. And have it rotate 90 degrees forward when jumping??

Product Version: Not Selected
Tags:
more ▼

asked Oct 09 '14 at 10:32 PM in Blueprint Scripting

avatar image

AaronGryllsKhan
6 1 3 1

avatar image Jacky Oct 09 '14 at 10:36 PM

Remove the skeletal mesh in the BP and bring your cube in as a static mesh component in the Components tab of the character BP. Then you can make the rotation animations with **Timeline*s and/or Vinterp To* in the Event Graph.

avatar image AaronGryllsKhan Oct 09 '14 at 10:44 PM

Delete in the components tab of MyCharacter Blueprint from third template is grayed out and I'm unable to delete the skeletal mesh of the blue man?

avatar image Jacky Oct 09 '14 at 10:50 PM

Hmm, ok. Then do this if you arent familiar with blueprints yet. Create a new character BP in the content browser and do everything you see in the third person character BP, except for the skeletal mesh. If you want to know what you will be doing, follow this tutorial: http://www.youtube.com/watch?v=GWbd0Wowwnk&list=PLZlv_N0_O1gZS5HylO_368myr-Kg2ZLwb . It will be more helpful for you in the long run.

avatar image AaronGryllsKhan Oct 09 '14 at 11:26 PM

alt text

I've managed to get the cube as my character, but when I jump it just floats up in the air, and when I move forward it just slides forward. How could I get it to roll 90 degrees every time it moves and jumps?

cube.jpg (379.3 kB)
avatar image Jacky Oct 11 '14 at 03:42 AM

Did you do anything in the event graph that will tell the cube to rotate when you do those actions? If you have post a screenshot please, if not let me know and i'll try to help.

avatar image AaronGryllsKhan Oct 12 '14 at 04:00 PM

No I haven't. I don't know what to do in the Event Graph! What do you suggest?

avatar image Jacky Oct 12 '14 at 04:50 PM

This is how you rotate the cube forward when you move forward and then rotate it back to normal when you stop:

alt text

You should be able to figure out the jump yourself now.

moverotate_cube.jpg (134.8 kB)
avatar image AaronGryllsKhan Oct 12 '14 at 07:04 PM

I get this when I try link the cube static mesh up to the Set Relative Location?

1222.png (446.5 kB)
avatar image Jacky Oct 12 '14 at 07:13 PM

Drag a line from Cube variable and then type set relative location, it will give you the node for component instead of actor.

avatar image Moss Oct 12 '14 at 07:13 PM

You are trying to move the cube mesh and not the actor, you should move the actor. Just use 'self' instead of 'cube'.

avatar image AaronGryllsKhan Oct 12 '14 at 07:58 PM

alt text

This is what I've got so far. How do I get "Target Relative Rotation" thing?

12222.png (516.0 kB)
avatar image Jacky Oct 12 '14 at 08:11 PM

Unplug the cube from that error giving set rotation, create another cube variable and plug that into it.

avatar image AaronGryllsKhan Oct 12 '14 at 08:16 PM

I complied and I have no errors but I'm still missing the Target Relative rotation thing you have next to the cube variable? When I play nothing happens except the cube slides, what is meant to happen?

avatar image Jacky Oct 12 '14 at 08:22 PM

You probably forgot to set the angle value for rotation. Check out my screenshot from the post earlier.

avatar image AaronGryllsKhan Oct 12 '14 at 08:26 PM

alt text

I've tried to do everything exactly the same as you have. He still doesn't rotate 90 degrees forward when moving ? :/

12222.png (500.7 kB)
avatar image Jacky Oct 12 '14 at 08:28 PM

No you havent. Look what i have after Cube variable. Drag from Cube and then type Get relative rotation, then get that node. And then plug it to Current input of each set rotation function.

avatar image AaronGryllsKhan Oct 12 '14 at 08:34 PM

Okay I did that, but when I move forward my cube tilts 45 degrees backwards

avatar image Jacky Oct 12 '14 at 08:40 PM

Then set it to -45 degrees.

Since you are new to programming i suggest watching through all of these videos on blueprints: http://www.youtube.com/playlist?list=PLZlv_N0_O1gbYMYfhhdzfW1tUV4jU0YxH And all other UE4 tutorials as well on Unreal Engine Youtube channel. They will save you a lot of time really.

Dont get me wrong, btw. I'm not a programmer either so those tutorials help a lot.

avatar image AaronGryllsKhan Oct 12 '14 at 08:44 PM

I've already watched them

avatar image AaronGryllsKhan Oct 12 '14 at 08:36 PM

Okay so I messed with values and when I move forward he now rotates 90 degrees forward, but he only does it once. How can I get it so he does it continuously? :)

avatar image Jacky Oct 12 '14 at 08:50 PM

Post a screenshot of your BP again please. With this setup it should lean forward as long as you hold the forward button and then straighten up when you stop.

avatar image AaronGryllsKhan Oct 12 '14 at 09:06 PM

He leans forward 90 degrees, but I want it so that he's constantly moving in 90 degree intervals if you know what I mean? Like he just keeps rotating forward constantly until the W key is unpressed. How can I achieve this?

avatar image Jacky Oct 12 '14 at 09:19 PM

For that you'll need a looping Timeline with a Vector track instead of that first RInterp To of the first set rotation.

avatar image AaronGryllsKhan Oct 12 '14 at 09:47 PM

alt text

What am I doing wrong here?

12222.jpg (429.0 kB)
avatar image AaronGryllsKhan Oct 12 '14 at 09:24 PM

alt text

Where do I go from here? I really appreciate the help so far by the way, means a lot :)

12222.png (412.6 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
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