• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by SyntaxTerror · Aug 26, 2015 at 02:57 PM · platformerwrap

How to perform a wrap-around?

I'm working on a platformer that has static levels (i.e. non-scrolling). Some levels will have platforms that are open at the edge of the screen. At the moment I have a system that uses triggers to determine when a gameobject is leaving the edge of the screen.

The problem is that it doesn't look right. When an object hits the first trigger, it disappears and reappears at the position of the 'partner' trigger at the other side of the screen. What I would like instead is that an object moves off the edge of the screen but wraps around and appears on the other side of the screen smoothly (i.e. walks on rather than just appear).

I'm trying to figure out the best way of doing this. This game is likely to be desktop/console only. There will be a variant for mobile platforms. So I don't think there's as much of a need for resolution independence.

Can someone suggest a way of doing what I need? I'm struggling to get my head around it.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image _Gkxd · Aug 26, 2015 at 03:32 PM 0
Share

When you are wrapping around the screen, you will have a point where the part of the character is on the left side and part of it is on the right side. You would essentially need to have two characters then, which can get a bit complicated to deal with.

Depending on your needs, it might be easier to cover this up using special effects. Here is an example that I think is pretty good (the example starts at around 20 seconds in): https://www.youtube.com/watch?v=-65rvOO0uqY

Notice how the pieces of tree/mist obscure the edges of the screen where you might see the character wrap. This eliminates the need to have any complicated mechanism that handles having the character in two locations at once.

avatar image SyntaxTerror · Aug 26, 2015 at 05:42 PM 0
Share

Thanks. That's a good idea. The only problem is that I'll have to completely rework the graphics to fit it in, although that may not be so bad - although it'll push the project back by 2-3 weeks. The link you provided has given me an idea (that's a great looking game).

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

26 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

2D 360 degress platformer example needed 0 Answers

?Can you loop a terrain, to make it never-ending? 3 Answers

How do I code legacy animations in wrap mode Unity C# 0 Answers

jumping through and on a platforms(2d) 1 Answer

Platformer object control 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges