Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

Camera Following Projectile

Archive: 10 posts


I'm working on a level where the player is in a Controlinator and can fire projectiles. I'd like a camera to follow the projectile until it hits something, and then return to the player/cannon.

Can someone give me a quick and dirty way to do this?

Much thanks
2011-02-10 17:33:00

Author:
ZipCity
Posts: 208


Hmm, if your projectile is an object (e.g. an electrified or plasmarized piece of wood with an impact sensor connected to a destroyer), you can place a tag on it, and a follower along with a movie camera on some hologram material (set to 0% visibility). In addition place a tag sensor and a destroyer on the hologram. Set the tag sensor to invert output and connect it to the destroyer. This way the camera should follow the projectile until it's destroyed and the tag disappears. Then the tag sensor should activate and destroy the hologram with the movie camera. I think the normal camera should return to the player then, but I can't test it at the moment, sorry. Oh, and you have to emit a new hologram/camera with each shot of course.

If the projectile is some fire/plasma/water from the tools bag... good question. You'd have to fire a hologram with a camera in the same direction with the same speed. If it's on the same layer as the projectile, you could place an impact sensor connected to a destroyer on the hologram. If it hits the target shortly before it's destroyed by the projectile, this should also destroy the camera. Sorry, not sure if that really works.
2011-02-10 18:02:00

Author:
Unknown User


It's a solid object, not fire or water. I'll see if that works2011-02-10 18:29:00

Author:
ZipCity
Posts: 208


It's a shame that there is no camera option to simply stick it to something and tell it to center on the object it's stuck to 2011-02-10 18:54:00

Author:
ZipCity
Posts: 208


Why don't you just slap the camera on the projectile and make it change to the camera when you want, then it will stop when the projectile disappears. The camera goes with the projectile. Except you have to sync it so the camera changes exactly when the projectile hits.

2011-02-10 19:43:00

Author:
mutant_red_peas
Posts: 516


you dont have to sync anything, a movie camera should turn off if it is destroyed (it did in the beta anyway) this way make it so that the trigger zone of the movie camera is large enough to detect sackboy when the projectile is emitted, and it shold follow along 2011-02-10 21:18:00

Author:
Skalio-
Posts: 920


Hmm, if your projectile is an object (e.g. an electrified or plasmarized piece of wood with an impact sensor connected to a destroyer), you can place a tag on it, and a follower along with a movie camera on some hologram material (set to 0% visibility). In addition place a tag sensor and a destroyer on the hologram. Set the tag sensor to invert output and connect it to the destroyer. This way the camera should follow the projectile until it's destroyed and the tag disappears. Then the tag sensor should activate and destroy the hologram with the movie camera. I think the normal camera should return to the player then, but I can't test it at the moment, sorry. Oh, and you have to emit a new hologram/camera with each shot of course.

I made a hologram square with a microchip containing a follower (set to follow a blue tag), a camera, and an purple tag sensor (inverted, so it won't turn on until it's away from the purple tag attached to the cannon)

the cannon ball has a microchip with a blue tag, plus some other physics/sound stuff.

problem is, the hologram isn't following the cannonball. It just sits there. Does the follower need to connect something/have something connected to it?
2011-02-10 21:34:00

Author:
ZipCity
Posts: 208


Okay, maybe I'm stupid......is the hologram supposed to be attached to the projectile?2011-02-11 00:18:00

Author:
ZipCity
Posts: 208


I made a hologram square with a microchip containing a follower (set to follow a blue tag), a camera, and an purple tag sensor (inverted, so it won't turn on until it's away from the purple tag attached to the cannon)

the cannon ball has a microchip with a blue tag, plus some other physics/sound stuff.

problem is, the hologram isn't following the cannonball. It just sits there. Does the follower need to connect something/have something connected to it?

The follower is a mover itself, so normally it's sufficient to just place it onto the hologram. Set the speed and acceleration to the maximum value (100 for each) and allow up/down movement. I've also noticed that it can cause problems if you set the max detecion radius too small and the tag starts moving fast. Set it to a generous large radius. The follower will always try to center the tag when the minimum detection radius is set to 0, so a larger max radius doesn't change where your hologram with the camera will be.
Another problem could be the speed of your projectile with the tag. The follower is pretty fast, but there's a maximum speed. In that case either try to reduce the speed of the projectile, or as mutant_red_peas and Skalio- suggested test a camera directly on the bullet (that's a nice idea, I was thinking too complicated again ). The advantage of the hologram/follower method would be that you can integrate a timer in front of the destroyer, so the camera still shows the destruction of the target before it's destructed. Oh, and to answer your other question: the hologram shouldn't be attached to anything.
Hope this helps, let me know if it worked
2011-02-11 16:05:00

Author:
Unknown User


the problem I had was that the projectile fired and the hologram just sat there, not following anything. I'll look into all the tweaks and see if I can make it work.

for the record, the projectile isn't moving very fast.
2011-02-11 17:10:00

Author:
ZipCity
Posts: 208


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.