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"

Spin the wheel type game

Hi, im new to Unreall and wish to make a spin the wheel type game. I want the player to be able to spin the wheel and Get questions basen on where the wheel stopped.

I have tried to animate The material in BP but I need help with how I’m suppose to get the game to know where the wheel stopped or a better way to make it work.

Any help would be appreciated!

Product Version: UE 4.20
more ▼

asked Oct 07 '18 at 02:33 PM in Blueprint Scripting

avatar image

24 1 1 6

avatar image Everynone Oct 07 '18 at 04:35 PM

You need to do it in material? Not considering 3d at all?

avatar image Nebula Games Inc Oct 07 '18 at 04:37 PM

Yea a 3D wheel would be much simpler.

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

2 answers: sort voted first

You could do it mathematically by dividing up ranges of rotation into array slots,

but I think the easiest would be to add little overlap or collision volume components manually along the rim, and have another one stationary as the wheel marker, which would detect when one of those pins overlaps with it or stops overlapping. it could get their name and then access a map between the pin names and the questions or scores or other effects that each should cause.

more ▼

answered Oct 07 '18 at 09:39 PM

avatar image

3.8k 18 23 20

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

ok, so i followed your tips and made the object rotate instead. I have also mad some boxes to detect collision with another Cone actor.

I'm having trouble getting the detection working. How can i go about this?

TY so much for your help! her are my screenshots.alt text

alt text

view.png (429.4 kB)
bp.png (143.8 kB)
more ▼

answered Oct 08 '18 at 04:33 PM

avatar image

24 1 1 6

avatar image Nebula Games Inc Oct 08 '18 at 04:41 PM

You have to make sure collision is enabled on the cone. And make sure it is a type that will be overlapped by the collision boxes. So if the cone is a world static object make sure the collision boxes overlap world static objects. If you can’t get even a print string to fire off from an overlap then you have the settings messed up somewhere

avatar image mightyenigma Oct 08 '18 at 04:48 PM

I see your screenshot shows how to make the wheel spin but there's nothing about handling the OnComponentBeginOverlap event. If that is absent, nothing will happen. If it is present, please show how you've implemented it. Thanks :)

avatar image Betag Oct 08 '18 at 05:05 PM

I'm having some trouble with this. Should the overlapping occur in the "Wheel BP" or "Cone BP"?

avatar image Betag Oct 08 '18 at 05:08 PM

alt text This is what i have tried, but it don't work they way it should.

det.png (136.6 kB)
avatar image mightyenigma Oct 09 '18 at 03:02 PM

Either the wheel or the cone can handle it but it is easier for me to think about it from the cone's perspective. I would use componentbeginoverlap instead of actorbeginoverlap so that the event tells me which component just hit the cone, and we can choose what to do based on that. When you say your blueprint isnt working then do you mean the overlap event is not firing or the print strings are not printing or what? Have you tried putting a breakpoint on the event to see step by step what happens versus what you thought would happen?

avatar image mightyenigma Oct 09 '18 at 03:06 PM

Overlaps occur on both objects when one hits the other as far as I know. So just ha dle the overlap on the one that makes most sense to you.

Remember your collision channels need to be set up to match between both objects, object/collision type and channels of types it can overlap with. Also both objects need a component that has a collision primitive in it check the static mesh assets for both to make sure, although in the case of your wheel I am uncertain how it will go with the invisible collider components.

Make sure all the actors or components involved have their Generate Overlap Events checkbox ticked.

avatar image Betag Oct 15 '18 at 05:11 PM

Everything works fine in the editor now. The wheel spins and a card is chosen based on the result of the spin. But somehow when i package the game my card animation don't appear. The wheel spins, and then nothing.

(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