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"

Help with changing wheel radius during runtime

I'm very unfamiliar with C++ and struggling to get this to work. I want to be able to change the radius of a wheel when a custom event is fired alt text I'm using the wheel class built into unreal and the class defaults has the variable I want to change but must be compiled first and unaccessible from blueprints alt text here is the code for the shape radius in VehicleWheel.h. It says edit anywhere but I'm not sure what that means exactly.alt text

Any help on the matter would be greatly appreciated! Many Thanks, Sean

Product Version: UE 4.16
Tags:
capturehelpplz.png (182.8 kB)
capturehelpplz2.png (223.0 kB)
code.png (4.0 kB)
more ▼

asked Aug 02 '17 at 02:47 AM in C++ Programming

avatar image

Sean_McIntosh
1 1 2 3

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

3 answers: sort voted first

Been looking into this a bit for you :) There is a CreateWheels and DestroyWheels functions that can be overridden in WheeledVehicleMovementComp which may do the trick after changing the radius (it's a protected function so you will need to create your own WheeledVehicleMovementComp inheriting from that).

more ▼

answered Aug 15 '17 at 12:55 AM

avatar image

RyroNZ
61 1 2 4

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

As of unreal 4.17 adding BlueprintReadWrite to a UPROPERTY will act accordingly, unless I was building the code in VS wrong all this time but I got it to work.

EDIT: Turns out i was able to change the radius and even get the wheel class to notice the change (Via Print text from radius) but it still doesn't update during runtime. the wheel stays the same. alt textalt text

solution1.png (4.5 kB)
solution2.png (30.7 kB)
more ▼

answered Aug 14 '17 at 02:08 PM

avatar image

Sean_McIntosh
1 1 2 3

avatar image n00854180t Aug 14 '17 at 11:42 PM

It may be that the wheel sets these properties on initialization, in which case you'll either need to set up a PostEditChange (or whatever it's called, the event that gets fired when a blueprint var gets changed) or set up a function to re-initialize the wheel manually.

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

answered Jul 22 '18 at 06:50 PM

avatar image

dollon
53 3 4 7

(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